<%--
  Created by IntelliJ IDEA.
  User: 86188
  Date: 2021/12/6
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
   <head>
    <title>用户登录</title>
       <link rel="stylesheet" href="assets/css/login.css"/>
   </head>
   <body>
<h1>用户登录</h1>
<form class="login-container" action="/ccylogin" method="post">

   <div class="login-item">
      <label for="username">登录账号：</label>
      <input name="u" type="text" id="username"/>
   </div>

   <div class="login-item">
      <label for="password">登录密码：</label>
      <input name="p" type="password" id="password"/>
   </div>

   <div class="login-item">
      <label>验证码：</label>
      <input name="c" type="text" class="login-code" />
      <img src="/ccycode" id="cc" />
      <a href="javascript:void(0)" onclick="changeCode()">看不清，换一张</a>
   </div>

   <div class="login-item">
      <button type="submit">登录</button>
   </div>

</form>
   </body>
<script>
   //javascript
   function changeCode() {
      cc.src = "/ccycode?t=" + Math.random();
   }
</script>
</html>
